#!/bin/sh
# setup_locale - Creates the directory structure for a new locale in the
#                wordpress-i18n repository for a new locale.

# First argument is the locale.  Ex:  es_ES
locale=$1

if [ -z "$locale" ]
then
	echo "A locale must be specified."
  echo Usage is: $0 locale [repository]
	exit
fi

# Second argument is the base directory of your working copy
# of wordpress-i18n.
base=$2

if [ -z "$base" ]
then
  base=.
fi

if [ ! -d "$base" ]
then
	echo "Directory $base does not exist."
  echo Usage is: $0 locale [repository]
	exit
fi

cd $base

svn mkdir $locale
svn mkdir $locale/trunk
svn mkdir $locale/branches
svn mkdir $locale/tags

svn mkdir $locale/trunk/dist

svn commit $locale -m "$locale" --force-log
